<!-- saved from url=(0022)http://internet.e-mail -->
<html>
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript" src="js/numeric.js"></script>
<script language="javascript" src="js/email.js"></script>
<script language="javascript">
<!--
function validateForm(iform) {
  	//return true;
	if (iform.classification.value=="") {
		alert("classification required.");
		iform.classification.focus();
		return false;
	}
	if (iform.subClass.value=="") {
		alert("sub-class required.");
		iform.subClass.focus();
		return false;
	}
	if (iform.assessedValue.value=="") {
		alert("assessed value required.");
		iform.assessedValue.focus();
		return false;
	} 
	else if (!isNumeric(unformatCurrency(iform.assessedValue.value))) {
		alert("Invalid assessed value.");
		iform.assessedValue.focus();
		return false;
	}
	calculateFairMarketValue()
	iform.submit();
	return true;
}
function calculateMarketValue(){
	numeric = true;
	if (!isNumeric(unformatCurrency(document.LandEncode.area.value))){
		alert("numeric values only.");
		document.LandEncode.area.focus();
		return false;
	}
	if (!isNumeric(unformatCurrency(document.LandEncode.unitValue.value))){
		alert("numeric values only.");
		document.LandEncode.unitValue.focus();
		return false;
	}
	if (numeric){
		num = unformatCurrency(document.LandEncode.area.value) * unformatCurrency(document.LandEncode.unitValue.value);
		document.LandEncode.marketValue.value = formatCurrency(num);
	}
	calculateAdjustedMarketValue();
	return true;
}
function calculateValueAdjustment(){
	numeric = true;
	if (!isNumeric(document.LandEncode.percentAdjustment.value)){
		alert("numeric values only.");
		document.LandEncode.percentAdjustment.focus();
		return false;
	}
	if (numeric){
		document.LandEncode.valueAdjustment.value = document.LandEncode.percentAdjustment.value - 100;
	}
	calculateAdjustedMarketValue();
	return true;
}
function calculateAdjustedMarketValue(){
	num = unformatCurrency(document.LandEncode.marketValue.value) * (document.LandEncode.percentAdjustment.value/100);
		document.LandEncode.adjustedMarketValue.value = formatCurrency(num);
	calculateAssessedValue();
	return true;
}
function calculateAssessedValue(){
	numeric = true;
	if (!isNumeric(document.LandEncode.assessmentLevel.value)){
		alert("numeric values only.");
		document.LandEncode.assessmentLevel.focus();
		return false;
	}
	if (numeric){
		num = unformatCurrency(document.LandEncode.adjustedMarketValue.value) * (document.LandEncode.assessmentLevel.value/100);
		num = roundToNearestTen(num);
		document.LandEncode.assessedValue.value = formatCurrency(num);
	}
	return true;
}
function setDefaults(){
	//setDays('ve_');
	//setDays('pl_');
	//setDays('no_');
	setDays('as_');
	setDays('re_');
	setDays('av_');
	setDefaultDay('as_','{as_day}');
	setDefaultDay('re_','{re_day}');
	setDefaultDay('av_','{av_day}');
	window.resizeTo(600,500);
	pid = "{propertyID}";
	if (pid){
		calculateMarketValue();
	}
}
function setDefaultDay(type,day){
	eval("document.LandEncode."+type+"day.options["+day+"-1].selected = true");
}
function refreshParent() {
	//window.opener.location.reload(true);
	window.opener.focus();
	window.close();
}
function setDays(type) {
  var obj=eval("document.LandEncode."+type+"day");
  daySelected = obj.selectedIndex;
  objlen=obj.length;
  for (i=objlen-1; i>=28; i--) obj.options.remove(i);
  month_val = eval("document.LandEncode."+type+"month.value");
  switch(month_val) {
	case "2":
		birthYear = eval("document.LandEncode."+type+"year.value");
		if ((birthYear % 4) == 0) obj.options[28]=new Option("29");
		if (daySelected > 27){
  			daySelected = 27;
		}
	  	break;
	case "4":
	case "6":
	case "9":
	case "11":
		obj.options[28]=new Option("29");
		obj.options[29]=new Option("30");
		if (daySelected > 29){
  			daySelected = 29;	
		}
		break;	  
	default:
		obj.options[28]=new Option("29");
		obj.options[29]=new Option("30");
		obj.options[30]=new Option("31");
		break;
  }
  obj.options[daySelected].selected = true;
}
//-->
</script>
<link rel="stylesheet" href="css/elgu.css" type="text/css">
</head>
<body bgcolor="#CCCCCC" text="#000000" background="images/background/bg_middle.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="javascript: setDefaults();">
<form name="LandEncode" method="post" action="LandEncode.php{Session}">
  <!-- BEGIN FORM -->
  <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      <td colspan="3">&nbsp;</td>
    </tr>
    <tr> 
      <td>&nbsp;</td>
      <td> 
        <table width="90%" border="0" align="center" cellpadding="5" cellspacing="1" class="fileds_comment">
	 <tr bgcolor="#F6F6F6"> 
	  <td colspan="3" class="fileds_comment" valign="middle" align="left"><b>LAND 
	   PROPERTY INFORMATION</b></td>
	 </tr>
	 <tr bgcolor="#CCCCCC"> 
	  <td colspan="3" class="fileds_comment" align="left" nowrap>Identification 
	   Numbers </td>
	 </tr>
	 <tr> 
	  <td rowspan="2" class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6" width="100">&nbsp;</td>
	  <td class="fileds_comment" bgcolor="#F6F6F6"><input type="text" value="{arpNumber}" name="arpNumber" maxlength="32" size="30">
	   (ARP Number)</td>
	  <td class="fileds_comment" bgcolor="#F6F6F6"><input type="text" value="{propertyIndexNumber}" name="propertyIndexNumber" size="30">
	   (PIN)</td>
	 </tr>
	 <tr bgcolor="#F6F6F6"> 
	  <td class="fileds_comment"><input type="text" value="{octTctNumber}" name="octTctNumber" size="30">
	   (OCT/TCT Number)</td>
	  <td class="fileds_comment"><input type="text" value="{surveyNumber}" name="surveyNumber" size="30">
	   (Survey Number)</td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="left" nowrap colspan="3" bgcolor="#CCCCCC">Boundaries 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" valign="middle" nowrap rowspan="2" bgcolor="#F6F6F6">&nbsp;</td>
	  <td bgcolor="#F6F6F6"><input type="text" value="{north}" name="north" size="30">
	   (north)</td>
	  <td bgcolor="#F6F6F6"><input type="text" name="south" value="{south}" size="30"> 
	   <br>
	   (south)</td>
	 </tr>
	 <tr bgcolor="#F6F6F6"> 
	  <td><input type="text" value="{east}" name="east" size="30"> <br>
	   (east)</td>
	  <td><input type="text" value="{west}" name="west" size="30"> <br>
	   (west)</td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" bgcolor="#CCCCCC" colspan="3" align="left">Adminisrator</td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" rowspan="3" bgcolor="#F6F6F6"><input type="hidden" name="personID" value="{personID}">
	   Name</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="lastName" value="{lastName}" size="30"> 
	   <br>
	   (lastname)</td>
	 </tr>
	 <tr bgcolor="#F6F6F6"> 
	  <td class="fileds_comment" colspan="2"><input type="text" name="firstName" value="{firstName}" size="30">
	   (firstname)</td>
	 </tr>
	 <tr bgcolor="#F6F6F6"> 
	  <td class="fileds_comment" colspan="2"><input type="text" name="middleName" value="{middleName}" size="30">
	   middlename </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6" rowspan="3"><input type="hidden" name="addressID" value="{addressID}">
	   Address</td>
	  <td class="fileds_comment" bgcolor="#F6F6F6"><input type="text" name="number" value="{number}" size="30">
	   (number)</td>
	  <td class="fileds_comment" bgcolor="#F6F6F6"><input type="text" name="street" value="{street}" size="30"> 
	   <br>
	   (street)</td>
	 </tr>
	 <tr bgcolor="#F6F6F6"> 
	  <td class="fileds_comment"><input type="text" name="barangay" value="{barangay}" size="30">
	   (barangay)</td>
	  <td class="fileds_comment"><input type="text" name="district" value="{district}" size="30">
	   (district)</td>
	 </tr>
	 <tr bgcolor="#F6F6F6"> 
	  <td class="fileds_comment"><input type="text" name="municipalityCity" value="{municipalityCity}" size="30">
	   (municipality/city)</td>
	  <td class="fileds_comment"><input type="text" name="province" value="{province}" size="30">
	   (province)</td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">ContactNumber</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="telephone" value="{telephone}" size="30"> 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Email</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="email" value="{email}" size="30"> 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="left" bgcolor="#CCCCCC" colspan="3">Land 
	   Appraisal</td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Kind</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="kind" value="{kind}" size="30"> 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Classification</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="classification" value="{classification}" size="30"> 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Sub-Class</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="subClass" value="{subClass}" size="30"> 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Actual Use</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="actualUse" value="{actualUse}" size="30"> 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Area</td>
	  <td class="fileds_comment" bgcolor="#F6F6F6"><input type="text" name="area" value="{area}" size="30" onBlur="javascript: calculateMarketValue();"> 
	  </td>
	  <td class="fileds_comment" bgcolor="#F6F6F6"><table width="200" border="0" cellspacing="0" cellpadding="0">
		<tr class="fileds_comment"> 
		 <td><input type="radio" name="unit" value="square meters" {square meters}>
		  square meters</td>
		 <td><input type="radio" name="unit" value="hectares" {hectares}>
		  hectares</td>
		</tr>
	   </table></td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Unit Value</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="unitValue" value="{unitValue}" size="30" onBlur="javascript: calculateMarketValue()"> 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Market Value 
	  </td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="marketValue" value="{marketValue}" size="30" onFocus="javascript: calculateMarketValue();" onBlur="javascript: calculateMarketValue();"> 
	  </td>
	 </tr>
	 <!--tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Fair Market Value</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6">
<input name="fairMarketValue" type="text" id="fairMarketValue" size="30" onFocus="javascript: calculateMarketValue();" onBlur="javascript: calculateMarketValue();">
	  </td>
	 </tr-->
	 <tr align="left"> 
	  <td class="fileds_comment" bgcolor="#CCCCCC" colspan="3">Value Adjustments 
	   Factor </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Adjustment Factor 
	  </td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"> <textarea name="adjustmentFactor" cols="50" rows="4">{adjustmentFactor}</textarea> 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">% Adjustment</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="percentAdjustment" value="{percentAdjustment}" size="30" onBlur="javascript: calculateValueAdjustment();">
	   % </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Value Adjustment</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="valueAdjustment" value="{valueAdjustment}" size="30" onFocus="javascript: calculateValueAdjustment();" onBlur="javascript: calculateAdjustedMarketValue();">
	   % </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Adjusted Market 
	   Value</td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="adjustedMarketValue" value="{adjustedMarketValue}" size="30" onFocus="javascript: calculateAdjustedMarketValue();" onBlur="javascript: calculateAdjustedMarketValue()"> 
	  </td>
	 </tr>
	 <tr align="left"> 
	  <td class="fileds_comment" bgcolor="#CCCCCC" colspan="3">Property Assessment 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Assessment Level 
	  </td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="assessmentLevel" value="{assessmentLevel}" size="30" onBlur="javascript: calculateAssessedValue();">
	   % </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="right" bgcolor="#F6F6F6">Assessed Value 
	  </td>
	  <td class="fileds_comment" colspan="2" bgcolor="#F6F6F6"><input type="text" name="assessedValue" value="{assessedValue}" size="30" onFocus="javascript: calculateAssessedValue();" onBlur="javascript: calculateAssessedValue();"> 
	  </td>
	 </tr>
	 <tr> 
	  <td class="fileds_comment" align="center" valign="middle" bgcolor="#F6F6F6">&nbsp; 
	  </td>
	  <td colspan="2" class="fileds_comment" align="center" valign="middle" bgcolor="#F6F6F6"><input type="hidden" name="formAction" value="save"> 
	   <input type="hidden" name="propertyID" value="{propertyID}"> <input type="hidden" name="afsID" value="{afsID}"> 
	   <!-- BEGIN SubmitButton -->
	   <input type="button" value="Submit" name="submit" onClick="validateForm(document.LandEncode)"> <input type="reset" name="Submit2" value="Reset" > 
	   <!-- END SubmitButton -->
	   <input type="button" name="Button" value="Close"  onClick="refreshParent();" > 
	  </td>
	 </tr>
	</table>
      </td>
      <td>&nbsp;</td>
    </tr>
    <tr> 
      <td colspan="3">&nbsp;</td>
    </tr>
  </table>
  <!-- END FORM -->
</form>

</body>
</html>
